<div class="content-section introduction">
    <div>
        <span class="feature-title">ScrollPanel</span>
        <span>ScrollPanel is a cross browser, lightweight and skinnable alternative to native browser scrollbar.</span>
    </div>
</div>

<div class="content-section implementation">
    <div class="ui-g">
        <div class="ui-g-12 ui-md-4">
            <p-scrollPanel [style]="{width: '100%', height: '200px'}">
                <div style="padding:1em;line-height:1.5">
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                    son Michael has just come home from the war, but does not intend to become part of his father's business. Through
                    Michael's life the nature of the family business becomes clear. The business of the family is just like the head
                    of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands
                    against the good of the family.
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                    son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's
                    life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind
                    and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the
                    family.
                </div>
            </p-scrollPanel>
        </div>
        <div class="ui-g-12 ui-md-4">
            <p-scrollPanel [style]="{width: '100%', height: '200px'}" styleClass="custombar1">
                <div style="padding:1em;line-height:1.5">
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                    son Michael has just come home from the war, but does not intend to become part of his father's business. Through
                    Michael's life the nature of the family business becomes clear. The business of the family is just like the head
                    of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands
                    against the good of the family.
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                    son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's
                    life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind
                    and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the
                    family.
                </div>
            </p-scrollPanel>
        </div>
        <div class="ui-g-12 ui-md-4">
            <p-scrollPanel [style]="{width: '100%', height: '200px'}" styleClass="custombar2">
                <div style="padding:1em;line-height:1.5;width:600px">
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                    son Michael has just come home from the war, but does not intend to become part of his father's business. Through
                    Michael's life the nature of the family business becomes clear. The business of the family is just like the head
                    of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands
                    against the good of the family.
                    The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                    son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's
                    life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind
                    and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the
                    family.
                </div>
            </p-scrollPanel>
        </div>
    </div>
</div>

<div class="content-section documentation">
    <p-tabView effect="fade">
        <p-tabPanel header="Documentation">
            <h3>Import</h3>
<pre>
<code class="language-typescript" pCode ngNonBindable>
import &#123;ScrollPanelModule&#125; from 'primeng/scrollpanel';
</code>
</pre>

            <h3>Getting Started</h3>
            <p>ScrollPanel is defined with p-scrolPanel element having dimensions for the scrollable viewport.</p>
<pre>
<code class="language-markup" pCode ngNonBindable>
&lt;p-scrollPanel [style]="&#123;width: '100%', height: '200px'&#125;"&gt;
    Content
&lt;/p-scrollPanel&gt;
</code>
</pre>
            <h3>Customization</h3>
            <p>Look and feel can easily be customized, here is an example with a background and blue handle.</p>
<pre>
<code class="language-markup" pCode ngNonBindable>
&lt;p-scrollPanel [style]="&#123;width: '100%', height: '200px'&#125;" styleClass="custom"&gt;
    Content
&lt;/p-scrollPanel&gt;
</code>
</pre>

<pre>
<code class="language-css" pCode ngNonBindable>
.custom .ui-scrollpanel-wrapper &#123;
    border-right: 9px solid #f4f4f4; 
&#125;

.custom .ui-scrollpanel-bar &#123;
    background-color: #1976d2; 
    opacity: 1; 
    transition: background-color .3s; 
&#125;

.custom .ui-scrollpanel-bar:hover &#123;
    background-color: #135ba1;
&#125;
</code>
</pre>

            <h3>Properties</h3>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Type</th>
                            <th>Default</th>
                            <th>Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>style</td>
                            <td>string</td>
                            <td>null</td>
                            <td>Inline style of the component.</td>
                        </tr>
                        <tr>
                            <td>styleClass</td>
                            <td>string</td>
                            <td>null</td>
                            <td>Style class of the component.</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h3>Styling</h3>
            <p>Following is the list of structural style classes, for theming classes visit <a href="#" [routerLink]="['/theming']">theming page</a>.</p>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Element</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>ui-scrollpanel</td>
                            <td>Container element.</td>
                        </tr>
                        <tr>
                            <td>ui-scrollpanel-wrapper</td>
                            <td>Wrapper of content section.</td>
                        </tr>
                        <tr>
                            <td>ui-scrollpanel-content</td>
                            <td>Content section.</td>
                        </tr>
                        <tr>
                            <td>ui-scrollpanel-bar</td>
                            <td>Scrollbar handle.</td>
                        </tr>
                        <tr>
                            <td>ui-scrollpanel-bar-x</td>
                            <td>Scrollbar handle of a horizontal bar.</td>
                        </tr>
                        <tr>
                            <td>ui-scrollpanel-bar-y</td>
                            <td>Scrollbar handle of a vertical bar</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h3>Methods</h3>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Parameters</th>
                            <th>Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>refresh</td>
                            <td>-</td>
                            <td>Refreshes the position and size of the scrollbar.</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h3>Dependencies</h3>
            <p>None.</p>
        </p-tabPanel>

        <p-tabPanel header="Source">
        <a href="https://github.com/primefaces/primeng/tree/master/src/app/showcase/components/panel" class="btn-viewsource" target="_blank">
            <i class="fa fa-github"></i>
            <span>View on GitHub</span>
        </a>

<pre>
<code class="language-markup" pCode ngNonBindable>
&lt;div class="ui-g"&gt;
    &lt;div class="ui-g-12 ui-md-4"&gt;
        &lt;p-scrollPanel [style]="&#123;width: '100%', height: '200px'&#125;"&gt;
            &lt;div style="padding:1em;line-height:1.5"&gt;
                The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                son Michael has just come home from the war, but does not intend to become part of his father's business.
                Through Michael's life the nature of the family business becomes clear. The business of the family is just
                like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence
                whenever anything stands against the good of the family. The story begins as Don Vito Corleone, the head
                of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from
                the war, but does not intend to become part of his father's business. Through Michael's life the nature of
                the family business becomes clear. The business of the family is just like the head of the family, kind and
                benevolent to those who give respect, but given to ruthless violence whenever anything stands against the
                good of the family.
            &lt;/div&gt;
        &lt;/p-scrollPanel&gt;
    &lt;/div&gt;
    &lt;div class="ui-g-12 ui-md-4"&gt;
        &lt;p-scrollPanel [style]="&#123;width: '100%', height: '200px'&#125;" styleClass="custombar1"&gt;
            &lt;div style="padding:1em;line-height:1.5"&gt;
                The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                son Michael has just come home from the war, but does not intend to become part of his father's business.
                Through Michael's life the nature of the family business becomes clear. The business of the family is just
                like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence
                whenever anything stands against the good of the family. The story begins as Don Vito Corleone, the head
                of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from
                the war, but does not intend to become part of his father's business. Through Michael's life the nature of
                the family business becomes clear. The business of the family is just like the head of the family, kind and
                benevolent to those who give respect, but given to ruthless violence whenever anything stands against the
                good of the family.
            &lt;/div&gt;
        &lt;/p-scrollPanel&gt;
    &lt;/div&gt;
    &lt;div class="ui-g-12 ui-md-4"&gt;
        &lt;p-scrollPanel [style]="&#123;width: '100%', height: '200px'&#125;" styleClass="custombar2"&gt;
            &lt;div style="padding:1em;line-height:1.5"&gt;
                The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved
                son Michael has just come home from the war, but does not intend to become part of his father's business.
                Through Michael's life the nature of the family business becomes clear. The business of the family is just
                like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence
                whenever anything stands against the good of the family. The story begins as Don Vito Corleone, the head
                of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from
                the war, but does not intend to become part of his father's business. Through Michael's life the nature of
                the family business becomes clear. The business of the family is just like the head of the family, kind and
                benevolent to those who give respect, but given to ruthless violence whenever anything stands against the
                good of the family.
            &lt;/div&gt;
        &lt;/p-scrollPanel&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code>
</pre>
        </p-tabPanel>
    </p-tabView>
</div>
